#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QPushButton>
#include <QLineEdit>
#include <QLabel>
#include <QVBoxLayout>
#include <QMessageBox>

// Include the DLL header
#include "MathLibrary.h"

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

private slots:
    // Slot to handle button click
    void onCalculateClicked();

    // Slots to handle signals from DLL
    void onCalculationComplete(int result);
    void onCalculationError(const QString &errorMessage);

private:
    // UI components
    QLineEdit *m_inputA;
    QLineEdit *m_inputB;
    QPushButton *m_calculateButton;
    QLabel *m_resultLabel;

    // Instance of our DLL class
    Calculator *m_calculator;
};

#endif // MAINWINDOW_H
